<template>
  <div id="app">
    <Header :key="comp"></Header>
    <router-view @reload="reload" />
    <Footer></Footer>
    <Login v-show="$store.state.openLogin"></Login>
    <Player></Player>
  </div>
</template>


<script>
import Footer from './components/Footer.vue'
import Header from './components/Header.vue'
import Login from './components/Login.vue'
import Player from './components/Player.vue'
export default {
  data() {
    return {
      comp: 1,
    }
  },
  components: {
    Header,
    Footer,
    Login,
    Player,
  },
  methods: {
    //刷新头部组件
    reload() {
      this.comp++
    },
  },
}
</script>
<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
